package com.gzhryc.pay.enums;

/**
 * 收款类型
 * 
 * @author zhanghao
 * @version 2020-08-15
 */
public enum ReceivingMoneyType {

	Account(1, "第三方账号"), Bank(2, "银行卡"), Qrcode(3, "收款二维码");

	private Integer index;
	private String note;

	ReceivingMoneyType(Integer index, String note) {
		this.index = index;
		this.note = note;
	}

	public Integer index() {
		return index;
	}

	public String note() {
		return note;
	}

	public static String note(Integer index) {
		ReceivingMoneyType[] temp = ReceivingMoneyType.values();
		for (int i = 0; i < temp.length; i++) {
			ReceivingMoneyType item = temp[i];
			if (item.index.equals(index)) {
				return item.note;
			}
		}
		return null;
	}
}
